Using the License Reporting Tool

Use the License Reporting Tool (LRT) to run various reports.

What's New in LRT Version 2.1.0

To shorten the LRT runtime and reduce the size of the license reports, the default start date for usage reports is changed from 01-01-2007 to 01-01-(CURRENT_YEAR - 3). If you need a longer report period, you can still set an earlier start date using the -s option.

What's New in LRT Version 2.0.0

LRT 2.0 is the successor of the "Usage Reporting Tool", which was previously distributed with the Automation Engine. Compared to the "Usage Reporting Tool", LRT offers the following improvements:

Query Commands

To Use the LRT command Which includes the option(s)

Run all queries for my license mode

lrt.jar reports-create

-d dry run: write queries and system information to log, but don't execute queries/create report.

This option can be used to inspect the SQL for the reports in the log file without actually generating them.

In order to avoid accidential overwriting, reports are written to a timestamped subfolder of you configured output folder (e.g. C:\Automic\Tools\LRT\cli\windows\output\2017-03-29_11-40-50)

Run selected queries for my license mode lrt.jar reports-create reportName1 reportName2

-e excludes the mentioned reports (i.e. generates all reports except the mentioned ones)

-s <YYYY-MM-DD> start date of report, default 01-01-(CURRENT_YEAR - 3)

-f <YYYY-MM-DD> final date of report, default: current system date

Internally, the tool uses 00:00:00 for the time portion in the start and final datetime. Thus, to query all executions for the year 2015, one has to use the options -s 2015-01-01 -f 2016-01-01.

You can only use report names that are available in your current report_mode. Use the reports-list command to learn about them.

List all queries/reports for my license mode lrt.jar reports-list

-i <path_to_lrt>.ini uses the settings in the linked .ini file, can be used to generate reports for multiple Automation Engine installations at once.

When using multiple .ini files, make sure to specify a different output path in each of them. Otherwise all reports of your Automation Engine systems will be written to the same folder and it is difficult to tell them apart.

Use lrt.ini report_mode="usage_based", to just print or create the usage based reports, report_mode="task_based" to just print or create the task based reports, or report_mode="both" to print/create all reports.

The report_mode parameter also controls the creation of the reports. i.e. you can't create a task-based report when the report_mode is set to usage_based.

Verify the created reports in output dir lrt.jar reports-verify

-i <path_to_lrt>.ini uses the settings in the linked .ini file, can be used to generate reports for multiple Automation Engine installations at once.

When using multiple .ini files, make sure to specify a different output path in each of them. Otherwise all reports of your Automation Engine systems will be written to the same folder and it is difficult to tell them apart.

-o specifies the output path of reports. lrt.jar will inspect the files and all subfolders in this folder for report files and validate their content against their checksums

Warning, the verification does not cover: 

  • A plausibility check for the usage numbers in the reports (e.g. if the number of the executions in a report is lower than in the previous report)
  • Whether reports are missing for the desired usage period (e.g. LRT was scheduled to generate monthly reports and the report for July 2016 was never generated)

You have to do these checks manually.

Show the version of the lrt tool lrt.jar version  

Using the Command Line Usage Screen

To view the Command Line Usage Screen, navigate to your \cli\windows\bin sub-directory and enter java -jar lrt.jar. This will return the list of commands and command options you can use from the command line.

> java -jar lrt.jar

License Usage Reporting Tool v2.0

create and verify CSV reports on Automic product usage

 

Usage: lrt [command] [command options]

  Commands:

    reports-list      list all report names of current report_mode (lrt.ini)

      Usage: reports-list [options]

        Options:

          -i

            path to ini file whose settings will be used

 

    reports-create      create all or specific reports in current report_mode

            (lrt.ini)

      Usage: reports-create [options] [report1 report2 ... ]

        Options:

          -d

            dry run: write queries and system information to log, but don't

            execute queries

            Default: false

          -e

            create all reports except the given ones

            Default: false

          -f

            <YYYY-MM-DD> final date of report - exclude usage data after that

            date, 00:00 hs. Default: current system date

          -i

            path to ini file whose settings will be used

          -s

            <YYYY-MM-DD> start date of report - exclude usage data before that

            date, 00:00 hs. Default: 01-01-(CURRENT_YEAR - 3)

 

    reports-verify      verify the reports in output_path (lrt.ini)

      Usage: reports-verify [options]

        Options:

          -i

            path to ini file whose settings will be used

          -o

            output-directory of reports (overrides lrt.ini setting)

 

    version      show version information

      Usage: version

Listing Reports

The reports-list command lists the name of all available LRT reports. These names can later be used in the report-create command to create individual reports

> java -jar lrt.jar reports-list

INFO  - Reading INI file 'C:\Automic\Tools\LRT\cli\windows\bin\lrt.ini'

Task-based Reports:

    ActiveClients

    DailyEvnt

    DailyJobf

    DailyJobs

    DailyTasksTotal

    DefinedEvnt

    DefinedJobf

    DefinedJobs

    DefinedObjects

    MonthlyEvnt

    MonthlyJobf

    MonthlyJobs

    MonthlyTasksTotal

 

Usage-based Reports:

    AgentsDB

    AgentsFTP

    AgentsJMX

    AgentsOS

    AgentsRA

    AgentsSAP

    AgentsWS

    SAPSystemCopy

    SystemAdapters

 

General Reports:

    License

Verifying Reports

By running the reports-verify command, you can verify the authenticity of the CSV reports using the included checksums. The command processes all CSV reports that are stored in the output folder configured in lrt.ini. In case of a successful verification, the output looks like so:

> java -jar lrt.jar reports-verify

Verifying CSV report checksums in output folder 'C:\Automic\Tools\lrt\output':

 

2017-03-21_14-23-04\AE12_Agents_DB_Usage.csv ... OK

2017-03-21_14-23-04\AE12_Agents_FTP_Usage.csv ... OK

2017-03-21_14-23-04\AE12_Agents_JMX_Usage.csv ... OK

[...]

 

All 19 reports verified successfully

If the verification fails for one or more reports, the status "FAILED" is printed next to the failed report. An error summary informs the user how many of the reports have failed:

> java -jar lrt.jar reports-verify

Verifying CSV report checksums in output folder 'C:\Automic\Tools\lrt\output':

 

2017-03-21_16-37-55\AE12_Agents_DB_Usage.csv ... OK

2017-03-21_16-37-55\AE12_Agents_FTP_Usage.csv ... OK

2017-03-21_16-37-55\AE12_Agents_JMX_Usage.csv ... FAILED

[...]

 

Error: Verification failed for 1 of 19 reports

Examples

Creating Dry Run Reports

This example uses the -d dry run option to write the SQL queries and connection parameter for the reports to the log file, but not execute them. Use this to learn about the queries that are applied to fetch the report data.

> java -jar lrt.jar reports-create -d

Creating Select Reports

This example only creates the reports "AgentDB" and "AgentsFTP".

> java -jar lrt.jar reports-create AgentDB AgentsFTP

This example only works if you set the report_mode to both or usage_based.

Excluding Select Reports

This example creates all reports for the current reportmode, except for "AgentDB" and "AgentsFTP".

> java -jar lrt.jar reports-create -e AgentDB AgentsFTP

This example only works if you set the report_mode to both or usage_based.

Creating Reports By Date

This example creates all reports, but only considers usage data between March 1st, 2017, 00:00 AM until March 15th, 2017, 00:00 AM. By limiting the usage data to a certain time range, you will likely speed up the runtime of LRT.

> java -jar lrt.jar reports-create -s 2017-03-01 -f 2017-03-15

When using time ranges, your reports will only contain usage data for the given time period (e.g. last month). In order to cover the complete license period (e.g. last two years), you need to hand over multiple report sets to your sales rep. It is your responsibility to make sure the report sets are complete.

Creating Reports on Different Automation Engine Systems

This example uses the configuration of the ae108.ini file instead of the default lrt.ini

> java -jar lrt.jar reports-create -i ae108.ini

To define reports on a different Automation Engine system, you can specify the filepath to an alternate .ini file file using the -i option. The filepath can either be absolute or relative to lrt.jar.

Running a Batch File to Create Reports for Multiple Systems

In the example, a file named multiple_systems.bat is used to create the reports for AE_SYSTEM_1, AE_SYSTEM_2 and AE_SYSTEM_3 at once. The example assumes that the .ini files for these systems are located in the same folder than the batch file.

The contents for the multiple_systems.bat are should below.

rem assumes there is an AE_SYSTEM_1.ini, AE_SYSTEM_2.ini etc with the different settings for

rem each AE installation

for /F %%a in ("AE_SYSTEM_1 AE_SYSTEM_2 AE_SYSTEM_3") do (

   java -jar lrt.jar reports-create -i %~dp0%%f.ini

)

If you do run a batch file like this, make sure to configure the output_path for each system to a different sub-directory in each .ini file so you can tell which report belongs to which system.